<template>
  <button
    class="xtx-button"
    :class="[size, type]"
    @click="$emit('click', $event)"
  >
    <slot></slot>
  </button>
</template>

<script>
export default {
  name: 'xtx-button',
  props: {
    // small=>100*32  large=>300*60
    size: {
      type: String,
      default: ''
    },
    // gray 灰色#ccc  plain 主题色浅
    type: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped lang='less'>
.xtx-button {
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  user-select: none;
  border-radius: 4px;
  display: inline-block;
  width: 180px;
  height: 50px;
  background-color: @xtxColor;
  border: 1px solid @xtxColor;
  color: #fff;
  font-size: 16px;
  &.large {
    width: 300px;
    height: 60px;
  }
  &.small {
    width: 100px;
    height: 32px;
    font-size: 14px;
  }
  &.gray {
    background-color: #ccc;
    border: 1px solid #ccc;
  }
  &.plain {
    background-color: #e3f9f4;
    color: @xtxColor;
  }
}
</style>
